package org.uugu.iws.util;

import java.lang.reflect.Field;

/**
 * 开发者赋值块代码生成工具
 *
 * @author ChenZhiguo Created on 2014/9/28.
 */
public class DevelopUtil {

    public static void main(String[] arg){
        Class clazz = String.class; // 此处改为Domain对象类
        Field[] fileds = clazz.getDeclaredFields();
        for(Field field : fileds){
            String aaa = getStr("oldPerson", "set", field.getName()) + "(" + getStr("person", "get", field.getName())+ "()" + ");";
            System.out.println(aaa);
        }
    }

    public static String getStr(String beanName, String setOrGet, String arg){
        String str = beanName+"."+setOrGet +arg.substring(0,1).toUpperCase()
                +arg.substring(1,arg.length());
        return str;
    }
}
